[Experimental] Validate a folder move operation
curl --request POST \
--url http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--header 'X-Enable-Preview: <x-enable-preview>' \
--data '
{
"targetFolderId": "<string>"
}
'import requests
url = "http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview"
payload = { "targetFolderId": "<string>" }
headers = {
"X-Enable-Preview": "<x-enable-preview>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Enable-Preview': '<x-enable-preview>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({targetFolderId: '<string>'})
};
fetch('http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetFolderId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+json",
"X-Enable-Preview: <x-enable-preview>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview"
payload := strings.NewReader("{\n \"targetFolderId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Enable-Preview", "<x-enable-preview>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview")
.header("X-Enable-Preview", "<x-enable-preview>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"targetFolderId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-Enable-Preview"] = '<x-enable-preview>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"targetFolderId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"allowed": true,
"errorCode": "<string>",
"message": "<string>",
"nameConflict": true,
"suggestedRename": "<string>"
}[Experimental] Validate a folder move operation
[Experimental] Validate a folder move operation
curl --request POST \
--url http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/vnd.composer.v3+json' \
--header 'X-Enable-Preview: <x-enable-preview>' \
--data '
{
"targetFolderId": "<string>"
}
'import requests
url = "http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview"
payload = { "targetFolderId": "<string>" }
headers = {
"X-Enable-Preview": "<x-enable-preview>",
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/vnd.composer.v3+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Enable-Preview': '<x-enable-preview>',
Authorization: 'Basic <encoded-value>',
'Content-Type': 'application/vnd.composer.v3+json'
},
body: JSON.stringify({targetFolderId: '<string>'})
};
fetch('http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'targetFolderId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/vnd.composer.v3+json",
"X-Enable-Preview: <x-enable-preview>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview"
payload := strings.NewReader("{\n \"targetFolderId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Enable-Preview", "<x-enable-preview>")
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/vnd.composer.v3+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview")
.header("X-Enable-Preview", "<x-enable-preview>")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/vnd.composer.v3+json")
.body("{\n \"targetFolderId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://10.2.4.166:8080/composer/api/folders/{folderId}/move-preview")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-Enable-Preview"] = '<x-enable-preview>'
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/vnd.composer.v3+json'
request.body = "{\n \"targetFolderId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"allowed": true,
"errorCode": "<string>",
"message": "<string>",
"nameConflict": true,
"suggestedRename": "<string>"
}Authorizations
HTTP Basic authentication using global administrator credentials (username and password).
Headers
Opt-in header required to access this experimental endpoint. Must be "true" (case-insensitive).
Path Parameters
Body
application/vnd.composer.v3+json
Minimum string length:
1Was this page helpful?